using System;

namespace SharpMud.Scripting.Metadata
{
	/// <summary>
	/// Use this attribute to mark a method of an object as being a 'script' method.
	/// Used for objects containing multiple script implementations.
	/// The target method should have the signature of 'ScriptExecutionCall'.
	/// </summary>
	[AttributeUsage(System.AttributeTargets.Method)]
	public class ScriptMethodAttribute : System.Attribute
	{
		#region Private Variables
		private System.Guid _ScriptGuid;
		#endregion

		#region Contructors
		/// <summary>
		/// Marks a script implementation method has having no uniquely discernable guid
		/// </summary>
		public ScriptMethodAttribute()
			:this(System.Guid.Empty)
		{
		}

		/// <summary>
		/// Marks a script implementation method with its uniquely identifying guid
		/// </summary>
		public ScriptMethodAttribute(System.Guid scriptGuid)
		{
			this._ScriptGuid = scriptGuid;
		}
		#endregion

		/// <summary>
		/// The guid (or empty guid) that identifies the script implementation
		/// </summary>
		public System.Guid ScriptGuid
		{
			get
			{
				return _ScriptGuid;
			}
		}
	}
}
